﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/ShenBaoYBQY.master"
    AutoEventWireup="true" CodeFile="1-6.aspx.cs" Inherits="_1_6" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" runat="Server">
    <script src="../kongjian/Lodop/LodopFuncs.js" type="text/javascript"></script>
    <script src="../kongjian/myjs/myjs.js" type="text/javascript"></script>
    <style type="text/css">
        table.biaoge
        {
            border: 1px solid #888888;
            border-collapse: collapse;
            font-family: Arial,Helvetica,sans-serif;
            margin-top: 10px;
            width: 930px;
        }
        table.biaoge th
        {
            border: 1px solid #888888;
            padding: 5px 15px 5px 5px;
            text-align: center;
            vertical-align: middle;
        }
        table.biaoge td
        {
            border: 1px solid #AAAAAA;
            padding: 5px 15px 5px 5px;
            vertical-align: middle;
            text-align: center;
        }
        .style3
        {
            width: 425px;
        }
    </style>
    <span class="BiaoBiaoTi">表 1-6 用水情况（单位：万吨）</span>
    <table class="biaoge">
        <tr>
            <td rowspan="2">
                1、用水总量
            </td>
            <td colspan="5">
                新鲜用水
            </td>
            <td colspan="2">
                重复用水
            </td>
        </tr>
        <tr>
            <td>
                2.合计
            </td>
            <td>
                3.自来水
            </td>
            <td>
                4.地下水
            </td>
            <td>
                5.地表水
            </td>
            <td>
                6.其他水
            </td>
            <td>
                7.重复用水量
            </td>
            <td>
                8.重复用水率（%）
            </td>
        </tr>
        <tr>
            <td>
                <asp:TextBox ID="TextBoxYSZL" runat="server" Columns="8" BorderStyle="None" ReadOnly="True"></asp:TextBox>
            </td>
            <td>
                <asp:TextBox ID="TextBoxXXYS" runat="server" Columns="8" BorderStyle="None" ReadOnly="True"></asp:TextBox>
            </td>
            <td>
                <asp:TextBox onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"
                    ID="TextBoxZLS" runat="server" Columns="8" onchange="sumH()" onclick="gettishi('10110603')"
                    Style="ime-mode: disabled"></asp:TextBox>
            </td>
            <td>
                <asp:TextBox onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"
                    ID="TextBoxDXS" runat="server" Columns="8" onchange="sumH()" onclick="gettishi('10110604')"
                    Style="ime-mode: disabled"></asp:TextBox>
            </td>
            <td>
                <asp:TextBox onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"
                    ID="TextBoxDBS" runat="server" Columns="8" onchange="sumH()" onclick="gettishi('10110605')"
                    Style="ime-mode: disabled"></asp:TextBox>
            </td>
            <td>
                <asp:TextBox onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"
                    ID="TextBoxQTS" runat="server" Columns="8" onchange="sumH()" onclick="gettishi('10110606')"
                    Style="ime-mode: disabled"></asp:TextBox>
            </td>
            <td>
                <asp:TextBox onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"
                    ID="TextBoxCFYSL" runat="server" Columns="8" onchange="sumH()" onclick="gettishi('10110607')"
                    Style="ime-mode: disabled"></asp:TextBox>
            </td>
            <td>
                <asp:TextBox ID="TextBoxCFYSLV" runat="server" Columns="8" BorderStyle="None" ReadOnly="True"></asp:TextBox>
            </td>
        </tr>
    </table>
    <br />
    <div class="myTiShiKuang">
        <div>
            <table>
                <tr>
                    <td style="width: 456px">
                        <textarea id="TextArea1" name="S1" rows="3" style="width: 429px; height: 50px"></textarea>
                    </td>
                    <td class="style3">
                        <textarea id="TextArea2" name="S2" style="width: 429px; font-size: xx-large; color: #FF0000;
                            height: 50px; font-weight: 700;"></textarea>
                    </td>
                </tr>
                <tr>
                    <td style="width: 456px">
                        <textarea id="TextArea3" name="S3" rows="3" style="width: 429px; height:50px" cols="20"></textarea>
                    </td>
                    <td class="style3">
                        <asp:TextBox ID="TextBoxCuoWuXinXi" runat="server" height="50px" TextMode="MultiLine"
                            Width="429px"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <input id="Text1" style="visibility: hidden" type="text" value="<%=DisplayStr()%>"
        disabled="disabled" />
    <script type="text/javascript">
        function gettishi(str) {
            var str2 = document.getElementById("Text1").value;
            str2.replace(/\'/g, "\"");
            //取得文本框的值
            var arr = eval(str2);
            document.getElementById("TextArea1").value = '';
            document.getElementById("TextArea2").value = '';
            document.getElementById("TextArea3").value = '';


            for (var i = 0; i < arr.length; i++) {
                if (arr[i].tishiid == str) {
                    if (arr[i].ti1.length > 0) {
                        document.getElementById("TextArea1").value = arr[i].idmingcheng + "填写说明:  " + arr[i].ti1;
                    }
                    if (arr[i].ti2.length > 0) {
                        document.getElementById("TextArea2").value = arr[i].ti2;
                    }
                    if (arr[i].ti3.length > 0) {
                        document.getElementById("TextArea3").value = arr[i].idmingcheng + "填写例子:  " + arr[i].ti3;
                    }
                }
            }
        }
    </script>
    <script language="javascript" type="text/javascript">
        function sumH() {
            document.getElementById("<%=this.TextBoxXXYS.ClientID %>").value = toDecimal(Number(document.getElementById("<%=this.TextBoxZLS.ClientID %>").value) + Number(document.getElementById("<%= this.TextBoxDXS.ClientID %>").value) + Number(document.getElementById("<%= this.TextBoxDBS.ClientID %>").value) + Number(document.getElementById("<%= this.TextBoxQTS.ClientID %>").value));
            document.getElementById("<%=this.TextBoxYSZL.ClientID %>").value = toDecimal(Number(document.getElementById("<%=this.TextBoxXXYS.ClientID %>").value) + Number(document.getElementById("<%= this.TextBoxCFYSL.ClientID %>").value));
            document.getElementById("<%=this.TextBoxCFYSLV.ClientID %>").value = toDecimal((Number(document.getElementById("<%=this.TextBoxCFYSL.ClientID %>").value) / Number(document.getElementById("<%= this.TextBoxYSZL.ClientID %>").value)) * 100);
        }

        function toDecimal(x) {
            var f = parseFloat(x);
            if (isNaN(f)) {
                return;
            }
            f = Math.round(x * 10000) / 10000;
            return f;
        }  

    </script>
    <p style="text-align: center; width: 900px">
        <asp:Button ID="ButtonTiJiao" runat="server" OnClick="ButtonTiJiao_Click" Text="提交" />
        <asp:Label ID="LabelTiShi" runat="server" CssClass="TiShiLabel"></asp:Label>
        <input id="Button5" type="button" onclick="PrintOneURL('print/1-6.aspx')" value="打印本页" />
        &nbsp;<asp:HiddenField ID="HiddenField1" runat="server" />
    </p>
    <br />
    <br />
    <br />
    <br />
    <br />
</asp:Content>
